package mornd.extend.test7;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author: mornd
 * @dateTime: 2023/5/11 - 22:42
 */

@Component
public class Bean1 {
    Bean2 bean2;

    public Bean2 getBean2() {
        return bean2;
    }

    @Autowired
    public void setBean2(Bean2 bean2) {
        this.bean2 = bean2;
    }

    public void m1() {
        System.out.println("m1 普通方法");
    }

    public final void m2() {
        System.out.println("m2 final 方法");
    }

    public static void m3() {
        System.out.println("m3 static 方法");
    }

    private void m4() {
        System.out.println("m4 private 方法");
    }

    @Component
    static class Bean2 {}
}
